﻿
using System.ServiceModel.DomainServices.Client;

namespace WebSilverlight.Web
{
    public partial class ProductListProvider
    {
    #region Properties
		ProductDomainContext _dc;
        public ProductDomainContext DomainContext
        {
            set
            {
                _dc = value;
                if (_dc.ProductWrappers.Count == 0)
                {
                    _dc.Load<ProductWrapper>(_dc.GetProductQuery());
                }
            }
        }
        public EntitySet<ProductWrapper> EntityList
        {
            get
            {
                return _dc.ProductWrappers;
            }
        }        
	#endregion
		public ProductListProvider()
        {
            DomainContext = new ProductDomainContext();
        }
    }
}
